# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.

defmodule GoogleApi.Spectrum.V1explorer.Model.PawsGetSpectrumRequest do
  @moduledoc """
  The request message for the available spectrum query protocol which must include the device&#39;s geolocation.

  ## Attributes

  - antenna (AntennaCharacteristics): Depending on device type and regulatory domain, the characteristics of the antenna may be required. Defaults to: `null`.
  - capabilities (DeviceCapabilities): The master device may include its device capabilities to limit the available-spectrum response to the spectrum that is compatible with its capabilities. The database should not return spectrum that is incompatible with the specified capabilities. Defaults to: `null`.
  - deviceDesc (DeviceDescriptor): When the available spectrum request is made on behalf of a specific device (a master or slave device), device descriptor information for that device is required (in such cases, the requestType parameter must be empty). When a requestType value is specified, device descriptor information may be optional or required according to the rules of the applicable regulatory domain. Defaults to: `null`.
  - location (GeoLocation): The geolocation of the master device (a device with geolocation capability that makes an available spectrum request) is required whether the master device is making the request on its own behalf or on behalf of a slave device (one without geolocation capability). The location must be the location of the radiation center of the master device&#39;s antenna. To support mobile devices, a regulatory domain may allow the anticipated position of the master device to be given instead. If the location specifies a region, rather than a point, the database may return an UNIMPLEMENTED error code if it does not support query by region. Defaults to: `null`.
  - masterDeviceDesc (DeviceDescriptor): When an available spectrum request is made by the master device (a device with geolocation capability) on behalf of a slave device (a device without geolocation capability), the rules of the applicable regulatory domain may require the master device to provide its own device descriptor information (in addition to device descriptor information for the slave device, which is provided in a separate parameter). Defaults to: `null`.
  - owner (DeviceOwner): Depending on device type and regulatory domain, device owner information may be included in an available spectrum request. This allows the device to register and get spectrum-availability information in a single request. Defaults to: `null`.
  - requestType (String.t): The request type parameter is an optional parameter that can be used to modify an available spectrum request, but its use depends on applicable regulatory rules. It may be used, for example, to request generic slave device parameters without having to specify the device descriptor for a specific device. When the requestType parameter is missing, the request is for a specific device (master or slave), and the deviceDesc parameter for the device on whose behalf the request is made is required. Defaults to: `null`.
  - type (String.t): The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ, ...).  Required field. Defaults to: `null`.
  - version (String.t): The PAWS version. Must be exactly 1.0.  Required field. Defaults to: `null`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :antenna => GoogleApi.Spectrum.V1explorer.Model.AntennaCharacteristics.t(),
          :capabilities => GoogleApi.Spectrum.V1explorer.Model.DeviceCapabilities.t(),
          :deviceDesc => GoogleApi.Spectrum.V1explorer.Model.DeviceDescriptor.t(),
          :location => GoogleApi.Spectrum.V1explorer.Model.GeoLocation.t(),
          :masterDeviceDesc => GoogleApi.Spectrum.V1explorer.Model.DeviceDescriptor.t(),
          :owner => GoogleApi.Spectrum.V1explorer.Model.DeviceOwner.t(),
          :requestType => any(),
          :type => any(),
          :version => any()
        }

  field(:antenna, as: GoogleApi.Spectrum.V1explorer.Model.AntennaCharacteristics)
  field(:capabilities, as: GoogleApi.Spectrum.V1explorer.Model.DeviceCapabilities)
  field(:deviceDesc, as: GoogleApi.Spectrum.V1explorer.Model.DeviceDescriptor)
  field(:location, as: GoogleApi.Spectrum.V1explorer.Model.GeoLocation)
  field(:masterDeviceDesc, as: GoogleApi.Spectrum.V1explorer.Model.DeviceDescriptor)
  field(:owner, as: GoogleApi.Spectrum.V1explorer.Model.DeviceOwner)
  field(:requestType)
  field(:type)
  field(:version)
end

defimpl Poison.Decoder, for: GoogleApi.Spectrum.V1explorer.Model.PawsGetSpectrumRequest do
  def decode(value, options) do
    GoogleApi.Spectrum.V1explorer.Model.PawsGetSpectrumRequest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Spectrum.V1explorer.Model.PawsGetSpectrumRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
